﻿using System;


namespace GJXQGame
{
    public enum GUI_ID
    {
        GUI_ID_NONE              = 0,

        GUI_ID_MAIN            = 1,  // 主界面
        GUI_ID_PLAYINFOWIN          = 2,  // play界面
    }


    public static class GUI_ID_EX
    {
        public static TWin Window<TWin>(this GUI_ID id) where TWin : GUIBase
        { return GameManager.GUIManager[id] as TWin; }

        public static void Show(this GUI_ID id)
        { GameManager.GUIManager[id].Show(); }

        public static void Destory(this GUI_ID id)
        { GameManager.GUIManager[id].Destroy(); }

        public static void Refresh(this GUI_ID id)
        { GameManager.GUIManager[id].Refresh(); }

        public static void Resume(this GUI_ID id)
        { GameManager.GUIManager[id].Resume(); }
    }
}